package com.atguigu.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author wky
 * @create 2021-07-13-15:09
 */
public class FromTextFlie {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment senv = StreamExecutionEnvironment.getExecutionEnvironment();
        senv.setParallelism(1);
        DataStreamSource<String> readTextFile = senv.readTextFile("src/input/word.txt");
        readTextFile.print();
        senv.execute();

    }
}
